package test1;
import java.util.HashMap;

public class test1 {
	public static void main() {
		HashMap mapa = new HashMap();
		HashMap mapa2 = new HashMap();
		RequestStatus status = new RequestStatus();
		mapa.put("success", true);
		mapa.put("info", "Additional information");
		Object[] tabObjects = new Object[]{mapa, "ciag znakowy"};
		Object pojObject = tabObjects;
		if(((Object[])pojObject)[0] instanceof HashMap){
			mapa2 = (HashMap) ((Object[])pojObject)[0];
		}
		
		if (mapa.containsKey("success")) {
			status.success = (Boolean) mapa.get("success");
		}
		if (mapa.containsKey("info")) {
			status.info = (String) mapa.get("info");
		}
//	It works	
//		if (mapa.containsKey("success")) {
//			status.success = (Boolean) mapa.get("success");
//		}
//		if (mapa.containsKey("info")) {
//			status.info = (String) mapa.get("info");
//		}
	}
}
